package utils.base
{
	import flash.geom.Vector3D;

	public class MeshVertex
	{
		public var uvx:Number;
		public var uvy:Number;
		public var startWeight:int;
		public var weightCount:int;
		
		public var resultVector3D:Vector3D;
		
		public function MeshVertex(uvxIn:Number,uvyIn:Number,start:int,count:int)
		{
			this.uvx = uvxIn;
			this.uvy = uvyIn;
			this.startWeight = start;
			this.weightCount = count;
		}
		
		public function setResult(weightAry:Vector.<Weight>):void{
			resultVector3D = new Vector3D();
			for(var i:int = 0;i<weightCount;i++){
				var weight:Weight = weightAry[i + startWeight];
				resultVector3D.x += weight.resultVector3D.x;
				resultVector3D.y += weight.resultVector3D.y;
				resultVector3D.z += weight.resultVector3D.z;
			}
		}
		
	}
}